{include file="common/_meta" /}
<title>糖果机列表</title>
</head>
<body class="pos-r">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 矿机管理 <span class="c-gray en">&gt;</span> 会员矿机 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="page-container">
		<form class="Huiform" method="get" action="" >
		<div class="text-c"> 
			状态：
			<span class="select-box inline">
				<select name="status" class="select">
					<option value="0" >生产中</option> 
					<option value="1" style="color:green;">已完成</option>
				</select>
			</span>
			&nbsp;&nbsp;
			矿机类别
			<span class="select-box inline">
				<select name="type" class="select">
					<option value="">全部</option>
					{volist name="cmType" id="vo"}
					<option value="{$vo.type_id}">{$vo.type_name}</option>
					{/volist}
				</select>
			</span>
			<!-- <input type="text" class="input-text" style="width:250px" placeholder="会员姓名、手机号" id="" name="keywords" value="{$Request.get.keywords|default=''}"> -->
			<input type="text" class="input-text" style="display: none;" placeholder="" name="page" value="1">
			<button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
		</div>
		</form>
		<div class="cl pd-5 bg-1 bk-gray mt-20">
			<button class="btn btn-primary radius" onclick="freeAll(this)" href="javascript:;">
				手动释放 </button>
			<span class="r">共有数据：<strong>{$list->total()}</strong> 条</span> </div>
		<div class="mt-20">
			<table class="table table-border table-bg table-hover table-sort">
				<thead>
					<tr class="text-c">
						<th ><input name="" type="checkbox" value=""></th>
						<th >ID</th>
						<th>矿机类别</th>
						<th>会员信息</th>
						<th>已产生收益</th>
						<th>剩余天数</th>
						<th>共产生收益</th>
						<!-- <th>记录</th> -->
						<th>开始时间</th>
						<th>结束时间</th>
						<th>状态</th>
						<th >操作</th>
					</tr>
				</thead>
				<tbody>
					{volist name="list" id="vo"}
					<tr class="text-c va-m">
						<td><input name="" type="checkbox" value=""></td>
						<td>{$i}</td>
						<td>{$vo.candym_type.type_name}</td>
						<td>{$vo.owner.username}<br/>{$vo.owner.mobile}</td>
						<td>{$vo.candy_now}</td>
						<td>{$vo.left_days}</td>
						<td>{$vo.candy_total}</td>
						<td>{$vo.start}</td>
						<td>{$vo.end}</td>
						<td class="td-status">
							{if condition="$vo.status eq 1"}
							<span class="label label-success radius">已完成</span>
							{elseif condition="$vo.status eq 0"}
							<span class="label label-default radius">生产中</span>
							{else /}
							<span class="label label-error radius">宕机</span>
							{/if}
						</td>
						<td class="td-manage">
							
						</td>
					</tr>
					{/volist}
				</tbody>
			</table>
			<div class="pages" style="margin:20px;float: right; ">{$list->render()}</div>
		</div>
	</div>
</div>
{include file="common/_footer" /}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
$('select[name="status"]').val('{$Request.get.status|default=0}');
$('select[name="type_id"]').val('{$Request.get.type|default=0}');

function freeAll(obj) {
	$(obj).text('释放中...').attr('disabled', true);
	$.get("{:url('Cron/index')}", '', function(data){
		if (data) {
			layer.msg('成功释放');
			setTimeout(function(){
				history.go(0);
			}, 500);
		}
	});
}

</script>
</body>
</html>